<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>商品管理</title>
    <script src="http://localhost/juanpi/Static/Admin/js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="http://localhost/juanpi/Static/Admin/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="http://localhost/juanpi/Static/Admin/hdjs/hdjs.css"/>
    <link type="text/css" rel="stylesheet" href="http://localhost/juanpi/Static/Admin/css/common.css"/>
</head>
<body>
<div class="wrap">
    <table class="hd-table hd-table-list">
        <thead>
        <tr>
            <td width="150">货品ID</td>
            <?php foreach ($addData as $k=>$v){?>
            	<td width="200"><?php echo $v['atname'];?></td>
            <?php }?>
            <td width="200">库存</td>
            <td width="180">货号</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        	<tr>
        		<form action="" method="post">
        			<td width="150">编辑货品</td>
		        	<?php foreach ($addData as $k=>$v){?>
						<td>
							<select name="spec[]">
								<option value="0">----请选择----</option>
									<?php foreach ($v['value'] as $k=>$value){?>
										<option value="<?php echo $value['gtid'];?>"     <?php if(in_array($value['gtid'], $oldData['combine'])){ ?>selected<?php } ?> ><?php echo $value['gtvalue'];?></option>
									<?php }?>
							</select>
						</td>
		    		<?php }?>
		            <td width="200"><input type="text" name="inventory" id="" value="<?php echo $oldData['inventory'];?>"/></td>
		            <td width="180"><input type="text" name="number" id="" value="<?php echo $oldData['number'];?>"/></td>
		            <td width="200"></td>
		    </tr>
        	<tr>
            	<td width="200" colspan="20">
            		<input type="hidden" name="gid" value="<?php echo $hd['get']['gid'];?>" />
        			<input type="submit" value="完成" class="hd-btn hd-btn-primary hd-btn-sm"/>
            	</td>
        	</tr>
		            
        		</form>
        </tbody>
    </table>
    <style type="text/css">
    		.page_hdjob{
    			margin-top: 20px;
    			text-align: center;
    			font-size: 14px;
    			color: #333;
    		}
    		.page_hdjob a{
    			font-size: 14px;
    			color: #333;
    			padding: 3px 5px;
    			margin-left: 3px;
    			border: 1px solid #CCCCCC;
    			
    		}
    		.page_hdjob strong{
    			padding: 3px 5px;
    			margin-left: 3px;
    			background: red;
    			color: white;
    		}
    </style>
    <div class="page_hdjob">
      <?php echo $page;?>
    </div>
</div>

</body>
<script type="text/javascript">
	function del_modal(glid){
		hd_modal({
            width: 400,//宽度
            height: 120,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.3,//背景透明度
            success: function () {//点击确定后的事件
				location.href='<?php echo U("del");?>' + '&glid=' + glid;
            },
            cancel: function () {//点击关闭后的事件

            }
        });
	}	
</script>
</html>


